module.exports = {
  devServer: {
    open:true,
    overlay: false,
    port: 5050,
    proxy: {
      "/jmf": {
        target: "https://m.maoyan.com",
        // target: 'https://api.iynn.cn/film/api/v1',
        changeOrigin: true,
        pathRewrite: {
          "^/jmf": "",
        },
      },

      "/zlq": {
        // target:'https://m.maoyan.com',
        target: "https://api.iynn.cn/film/api/v1",
        changeOrigin: true,
        pathRewrite: {
          "^/zlq": "",
        },
      },
      "/api": {
        // 代理目标请求地址
        target: "https://m.maoyan.com/asgard/asgardapi/sns/common/feed/channel",
        // target: 'http://localhost',
        // 修改请求源地址的host，修改为它本身(true)  false为当前访问者的主机
        changeOrigin: true,
        secure: "false",
        // 规则匹配
        pathRewrite: {
          "^/api": "/",
        },
      },
      '/xd': {
        // 代理目标请求地址
        target: 'https://show.maoyan.com/maoyansh/myshow/ajax/celebrityBasicList',
        // target: 'http://localhost',
        // 修改请求源地址的host，修改为它本身(true)  false为当前访问者的主机
        changeOrigin: true,
        secure:false,
        // 规则匹配
        pathRewrite: {
          // 在请求地址中，把/wechen替换成空
          '^/xd': '/'
        }
      }
    },
  },
};
